﻿<Window x:Class="Asko.App.Views.AddConnectionView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="AddConnectionView" Height="300" Width="600" WindowStartupLocation="CenterOwner"
         DataContext="{Binding Main.ConnectionVM, Source={StaticResource Locator}}">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="200"/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Label Content="From:" HorizontalContentAlignment="Right" Margin="0,0,12,0" VerticalAlignment="Center" />
        <ComboBox Grid.Column="1" ItemsSource="{Binding Path=From}" SelectedItem="{Binding Path=SelectedFrom}">
            <ComboBox.ItemTemplate>
                <DataTemplate>
                    <Label Content="{Binding Path=Name}"/>
                </DataTemplate>
            </ComboBox.ItemTemplate>
        </ComboBox>
        <Label Content="To:" Grid.Row="1" HorizontalAlignment="Right" Margin="0 0 12 0" VerticalAlignment="Center"/>
        <ComboBox Grid.Column="1" Grid.Row="1" ItemsSource="{Binding Path=To}" SelectedItem="{Binding Path=SelectedTo}">
            <ComboBox.ItemTemplate>
                <DataTemplate>
                    <Label Content="{Binding Path=Name}"/>
                </DataTemplate>
            </ComboBox.ItemTemplate>
        </ComboBox>
        <Button Command="{Binding Path=AddCommand}" Content="Add" Grid.ColumnSpan="2" Grid.Row="2" Height="30" Width="100"/>
    </Grid>
</Window>
